package cas.ihep.pwa.fcn;

import org.apache.spark.api.java.function.Function2;
import scala.Tuple2;

public class ReduceTupleFcn implements Function2<Tuple2<Double,Double>,Tuple2<Double,Double>,Tuple2<Double,Double>> {
    @Override
    public Tuple2<Double, Double> call(Tuple2<Double, Double> v1, Tuple2<Double, Double> v2) {
        return new Tuple2<>(v1._1()+v2._1(),v1._2()+v2._2());
    }
}
